from django.conf.urls import url
from rest_framework_jwt.views import obtain_jwt_token

from . import views
urlpatterns =[
    # 用户名
    url('^usernames/(?P<username>\w{5,20})/count/$',views.UsernameCountView.as_view()),
    # 手机号
    url('^mobiles/(?P<mobile>1[3-9]\d{9})/count/$',views.MobileCountView.as_view()),
    # 个人中心设置
    url('^users/',views.UserView.as_view()),
    # 登录
    url(r'^authorizations/$', obtain_jwt_token),
    # 重写
    url(r'^user/$',views.UserDetailView.as_view()),
    # 设置邮箱
    url(r'^emails/$', views.EmailView.as_view()),
    # 验证邮箱
    url(r'^emails/verification/$', views.VerifyEmailView.as_view()),
]